<%@ taglib uri="http://java.sun.com/jsp/jstl/core" 				prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net" 						prefix="display" %>
<%@ taglib uri="/struts-tags" 									prefix="s"%>

<link type="text/css" rel="stylesheet" href="js/jquery/css/ui-lightness/jquery-ui-1.8.16.custom.css"/>
<script type="text/javascript" src="js/jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="styles/form-input.css" />
<link rel="stylesheet" type="text/css" href="styles/displaytag.css" />
<script type="text/javascript">
	$(document).ready(function() {
   		$("button").button();
 	});
	$(function() {
		var dates = $( "#fromDate, #toDate" ).datepicker({
			dateFormat: 'd MM, yy',
			showAnim: 'slide', 
			changeMonth: true,
			changeYear: true,
			numberOfMonths: 1,
			yearRange: '1958:2020',
			onSelect: function( selectedDate ) {
				var option = this.id == "fromDate" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
						date = $.datepicker.parseDate( instance.settings.dateFormat || $.datepicker._defaults.dateFormat,
							selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
	});
</script>

	<div class="error-text"><s:actionerror /></div>
	<div class="error-text"><s:fielderror /></div>
	<div class="message-text"><s:actionmessage /></div>
	
	<div>
		<s:form theme="simple" validate="false" method="POST" >
			<fieldset style="width:700px">
            	<legend><h3 style="color: #76879b">Cari Data</h3></legend>
           		<table cellpadding="3" class="table-form">
					<tr><td>Kata kunci</td><td><s:textfield name="keyword" size="30" maxLength="30"/></td></tr>
					<tr><td>Kantor Cabang</td><td><s:select name="branchCode" list="branchList" listKey="theKey" listValue="theValue" headerKey="-1" headerValue="All Branch"/></tr>
					<tr><td>Jenis Rekening</td><td><s:select name="accCode" list="accTypeMap" headerKey="-1" headerValue="All Account Type"/></tr>
					<tr><td>Tipe Nasabah</td><td><s:select name="cstCode" list="cstTypeMap" headerKey="-1" headerValue="Search by tipe nasabah"/></tr>
					<tr><td>Dari*</td><td width="200px"><s:textfield name="fromSearch" id="fromDate" readonly="true"/></td><td>sampai</td><td><s:textfield name="toSearch" id="toDate" readonly="true"/></td></tr>
					<tr></tr>
					<tr><td></td><td>
		            <s:submit type="button" action="searchChecklist">search</s:submit>
		            <button type="reset">reset</button>
	            </table>
			</fieldset>			
		</s:form>
	</div>
	<div>
		<h5 class="form-header" align="right"><s:property value="model.branchName"/></h5>
		<display:table 	id			= "mm"
              			name       	= "${model.masterModels}"
             			pagesize   	= "15" style="width:900px"
              			requestURI 	= "/checklist" 
              			class		= "display">
              	
            <%--<display:caption class="form-header">Checklist Table</display:caption>--%>
              	
   			<display:column title	= "NO."
              				value   = "${mm_rowNum}" />
              				   
		   	<display:column title 	= "Nomor Rekening"
		   					nulls	= "false" sortable= "true" >
		   		<c:if test="${mm.STATUS=='3'}">
					<c:url var="urlChecklist" value="checklistDetail">
						<c:param name="dataId" value="${mm.sid}"/>
					</c:url>
					<a href="${urlChecklist}">${mm.NO_REKENING}</a>	
				</c:if>
			</display:column>
		   	
		   	<display:column title 	= "Nama Nasabah"
		   					value	= "${mm.NAMA_NASABAH}" 
		   					sortable= "true" />
		   	
		   	<display:column title 	= "Jenis Rekening"
		   					value	= "${mm.JENIS_REKENING}" 
		   					sortable= "true"/>
		   	
		   	<display:column title 	= "Tipe Nasabah"
		   					value	= "${mm.TIPE_NASABAH}" 
		   					sortable= "true" />
		   					
		   	<display:column title 	= "Account Open"
		   					value	= "${mm.ACC_OPEN}" 
		   					sortable= "true" />
		   					
		</display:table>
	</div>